\(\int \log (c (a+b \sqrt {x})^p) \, dx\) [49]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 53 \[ \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=\frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \]

[Out]

-1/2*p*x-a^2*p*ln(a+b*x^(1/2))/b^2+x*ln(c*(a+b*x^(1/2))^p)+a*p*x^(1/2)/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {2498, 272, 45} \[ \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right )+\frac {a p \sqrt {x}}{b}-\frac {p x}{2} \]

[In]

Int[Log[c*(a + b*Sqrt[x])^p],x]

[Out]

(a*p*Sqrt[x])/b - (p*x)/2 - (a^2*p*Log[a + b*Sqrt[x]])/b^2 + x*Log[c*(a + b*Sqrt[x])^p]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rubi steps \begin{align*} \text {integral}& = x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-\frac {1}{2} (b p) \int \frac {\sqrt {x}}{a+b \sqrt {x}} \, dx \\ & = x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-(b p) \text {Subst}\left (\int \frac {x^2}{a+b x} \, dx,x,\sqrt {x}\right ) \\ & = x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-(b p) \text {Subst}\left (\int \left (-\frac {a}{b^2}+\frac {x}{b}+\frac {a^2}{b^2 (a+b x)}\right ) \, dx,x,\sqrt {x}\right ) \\ & = \frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.00 \[ \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=\frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \]

[In]

Integrate[Log[c*(a + b*Sqrt[x])^p],x]

[Out]

(a*p*Sqrt[x])/b - (p*x)/2 - (a^2*p*Log[a + b*Sqrt[x]])/b^2 + x*Log[c*(a + b*Sqrt[x])^p]

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.98

method result size
default \(x \ln \left (c \left (a +b \sqrt {x}\right )^{p}\right )-\frac {p b \left (-\frac {2 \left (-\frac {b x}{2}+a \sqrt {x}\right )}{b^{2}}+\frac {2 a^{2} \ln \left (a +b \sqrt {x}\right )}{b^{3}}\right )}{2}\) \(52\)
parts \(x \ln \left (c \left (a +b \sqrt {x}\right )^{p}\right )-\frac {p b \left (-\frac {2 \left (-\frac {b x}{2}+a \sqrt {x}\right )}{b^{2}}+\frac {2 a^{2} \ln \left (a +b \sqrt {x}\right )}{b^{3}}\right )}{2}\) \(52\)

[In]

int(ln(c*(a+b*x^(1/2))^p),x,method=_RETURNVERBOSE)

[Out]

x*ln(c*(a+b*x^(1/2))^p)-1/2*p*b*(-2/b^2*(-1/2*b*x+a*x^(1/2))+2*a^2/b^3*ln(a+b*x^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.96 \[ \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=-\frac {b^{2} p x - 2 \, b^{2} x \log \left (c\right ) - 2 \, a b p \sqrt {x} - 2 \, {\left (b^{2} p x - a^{2} p\right )} \log \left (b \sqrt {x} + a\right )}{2 \, b^{2}} \]

[In]

integrate(log(c*(a+b*x^(1/2))^p),x, algorithm="fricas")

[Out]

-1/2*(b^2*p*x - 2*b^2*x*log(c) - 2*a*b*p*sqrt(x) - 2*(b^2*p*x - a^2*p)*log(b*sqrt(x) + a))/b^2

Sympy [A] (verification not implemented)

Time = 0.51 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.15 \[ \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=- \frac {b p \left (\frac {2 a^{2} \left (\begin {cases} \frac {\sqrt {x}}{a} & \text {for}\: b = 0 \\\frac {\log {\left (a + b \sqrt {x} \right )}}{b} & \text {otherwise} \end {cases}\right )}{b^{2}} - \frac {2 a \sqrt {x}}{b^{2}} + \frac {x}{b}\right )}{2} + x \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )} \]

[In]

integrate(ln(c*(a+b*x**(1/2))**p),x)

[Out]

-b*p*(2*a**2*Piecewise((sqrt(x)/a, Eq(b, 0)), (log(a + b*sqrt(x))/b, True))/b**2 - 2*a*sqrt(x)/b**2 + x/b)/2 +
 x*log(c*(a + b*sqrt(x))**p)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.94 \[ \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=-\frac {1}{2} \, b p {\left (\frac {2 \, a^{2} \log \left (b \sqrt {x} + a\right )}{b^{3}} + \frac {b x - 2 \, a \sqrt {x}}{b^{2}}\right )} + x \log \left ({\left (b \sqrt {x} + a\right )}^{p} c\right ) \]

[In]

integrate(log(c*(a+b*x^(1/2))^p),x, algorithm="maxima")

[Out]

-1/2*b*p*(2*a^2*log(b*sqrt(x) + a)/b^3 + (b*x - 2*a*sqrt(x))/b^2) + x*log((b*sqrt(x) + a)^p*c)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 97 vs. \(2 (45) = 90\).

Time = 0.29 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.83 \[ \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=\frac {\frac {{\left (2 \, {\left (b \sqrt {x} + a\right )}^{2} \log \left (b \sqrt {x} + a\right ) - 4 \, {\left (b \sqrt {x} + a\right )} a \log \left (b \sqrt {x} + a\right ) - {\left (b \sqrt {x} + a\right )}^{2} + 4 \, {\left (b \sqrt {x} + a\right )} a\right )} p}{b} + \frac {2 \, {\left ({\left (b \sqrt {x} + a\right )}^{2} - 2 \, {\left (b \sqrt {x} + a\right )} a\right )} \log \left (c\right )}{b}}{2 \, b} \]

[In]

integrate(log(c*(a+b*x^(1/2))^p),x, algorithm="giac")

[Out]

1/2*((2*(b*sqrt(x) + a)^2*log(b*sqrt(x) + a) - 4*(b*sqrt(x) + a)*a*log(b*sqrt(x) + a) - (b*sqrt(x) + a)^2 + 4*
(b*sqrt(x) + a)*a)*p/b + 2*((b*sqrt(x) + a)^2 - 2*(b*sqrt(x) + a)*a)*log(c)/b)/b

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.89 \[ \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx=x\,\ln \left (c\,{\left (a+b\,\sqrt {x}\right )}^p\right )-\frac {p\,\left (b^2\,x+2\,a^2\,\ln \left (a+b\,\sqrt {x}\right )-2\,a\,b\,\sqrt {x}\right )}{2\,b^2} \]

[In]

int(log(c*(a + b*x^(1/2))^p),x)

[Out]

x*log(c*(a + b*x^(1/2))^p) - (p*(b^2*x + 2*a^2*log(a + b*x^(1/2)) - 2*a*b*x^(1/2)))/(2*b^2)